package com.springbootblog.controller.fontend;

import com.springbootblog.service.fontend.FooterService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

/**
 * 底部部分接口
 * @className AboutController
 * @author camellia
 * @email 805795955@qq.com
 * @date 2024/01/01
 * @version 1.0
 */
@RequestMapping("java")
@RestController
//@CrossOrigin(origins="*",maxAge=3600)
public class FooterController
{
    /**
     * 定义一个静态常量日志对象
     */
    private static final Logger logger = LoggerFactory.getLogger(IndexController.class);

    // 自动装载（service接口注入）
    @Autowired
    private FooterService footerService;

    /*public FooterController(HttpServletRequest request) {
        super(request);
    }//*/

    /**
     * 获取底部显示信息
     * @return
     */
    @GetMapping("footer/getFooterData")
    public Map<String,Object> getFooterData(HttpServletRequest request)
    {
        Map<String,Object> result = footerService.getFooterData(request);
        return result;
    }

}
